Optimal. Leaf size=88 \[ -\frac{2 A b-a B}{a^3 (a+b x)}-\frac{A b-a B}{2 a^2 (a+b x)^2}-\frac{\log (x) (3 A b-a B)}{a^4}+\frac{(3 A b-a B) \log (a+b x)}{a^4}-\frac{A}{a^3 x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0720933, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {77} \[ -\frac{2 A b-a B}{a^3 (a+b x)}-\frac{A b-a B}{2 a^2 (a+b x)^2}-\frac{\log (x) (3 A b-a B)}{a^4}+\frac{(3 A b-a B) \log (a+b x)}{a^4}-\frac{A}{a^3 x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rubi steps
\begin{align*} \int \frac{A+B x}{x^2 (a+b x)^3} \, dx &=\int \left (\frac{A}{a^3 x^2}+\frac{-3 A b+a B}{a^4 x}-\frac{b (-A b+a B)}{a^2 (a+b x)^3}-\frac{b (-2 A b+a B)}{a^3 (a+b x)^2}-\frac{b (-3 A b+a B)}{a^4 (a+b x)}\right ) \, dx\\ &=-\frac{A}{a^3 x}-\frac{A b-a B}{2 a^2 (a+b x)^2}-\frac{2 A b-a B}{a^3 (a+b x)}-\frac{(3 A b-a B) \log (x)}{a^4}+\frac{(3 A b-a B) \log (a+b x)}{a^4}\\ \end{align*}
Mathematica [A] time = 0.0485217, size = 81, normalized size = 0.92 \[ \frac{\frac{a^2 (a B-A b)}{(a+b x)^2}+\frac{2 a (a B-2 A b)}{a+b x}+2 \log (x) (a B-3 A b)+2 (3 A b-a B) \log (a+b x)-\frac{2 a A}{x}}{2 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.009, size = 105, normalized size = 1.2 \begin{align*} -{\frac{A}{{a}^{3}x}}-3\,{\frac{A\ln \left ( x \right ) b}{{a}^{4}}}+{\frac{\ln \left ( x \right ) B}{{a}^{3}}}-2\,{\frac{Ab}{{a}^{3} \left ( bx+a \right ) }}+{\frac{B}{{a}^{2} \left ( bx+a \right ) }}+3\,{\frac{\ln \left ( bx+a \right ) Ab}{{a}^{4}}}-{\frac{\ln \left ( bx+a \right ) B}{{a}^{3}}}-{\frac{Ab}{2\,{a}^{2} \left ( bx+a \right ) ^{2}}}+{\frac{B}{2\,a \left ( bx+a \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.07457, size = 135, normalized size = 1.53 \begin{align*} -\frac{2 \, A a^{2} - 2 \,{\left (B a b - 3 \, A b^{2}\right )} x^{2} - 3 \,{\left (B a^{2} - 3 \, A a b\right )} x}{2 \,{\left (a^{3} b^{2} x^{3} + 2 \, a^{4} b x^{2} + a^{5} x\right )}} - \frac{{\left (B a - 3 \, A b\right )} \log \left (b x + a\right )}{a^{4}} + \frac{{\left (B a - 3 \, A b\right )} \log \left (x\right )}{a^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.03995, size = 400, normalized size = 4.55 \begin{align*} -\frac{2 \, A a^{3} - 2 \,{\left (B a^{2} b - 3 \, A a b^{2}\right )} x^{2} - 3 \,{\left (B a^{3} - 3 \, A a^{2} b\right )} x + 2 \,{\left ({\left (B a b^{2} - 3 \, A b^{3}\right )} x^{3} + 2 \,{\left (B a^{2} b - 3 \, A a b^{2}\right )} x^{2} +{\left (B a^{3} - 3 \, A a^{2} b\right )} x\right )} \log \left (b x + a\right ) - 2 \,{\left ({\left (B a b^{2} - 3 \, A b^{3}\right )} x^{3} + 2 \,{\left (B a^{2} b - 3 \, A a b^{2}\right )} x^{2} +{\left (B a^{3} - 3 \, A a^{2} b\right )} x\right )} \log \left (x\right )}{2 \,{\left (a^{4} b^{2} x^{3} + 2 \, a^{5} b x^{2} + a^{6} x\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.99912, size = 168, normalized size = 1.91 \begin{align*} \frac{- 2 A a^{2} + x^{2} \left (- 6 A b^{2} + 2 B a b\right ) + x \left (- 9 A a b + 3 B a^{2}\right )}{2 a^{5} x + 4 a^{4} b x^{2} + 2 a^{3} b^{2} x^{3}} + \frac{\left (- 3 A b + B a\right ) \log{\left (x + \frac{- 3 A a b + B a^{2} - a \left (- 3 A b + B a\right )}{- 6 A b^{2} + 2 B a b} \right )}}{a^{4}} - \frac{\left (- 3 A b + B a\right ) \log{\left (x + \frac{- 3 A a b + B a^{2} + a \left (- 3 A b + B a\right )}{- 6 A b^{2} + 2 B a b} \right )}}{a^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2723, size = 134, normalized size = 1.52 \begin{align*} \frac{{\left (B a - 3 \, A b\right )} \log \left ({\left | x \right |}\right )}{a^{4}} - \frac{{\left (B a b - 3 \, A b^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{4} b} - \frac{2 \, A a^{3} - 2 \,{\left (B a^{2} b - 3 \, A a b^{2}\right )} x^{2} - 3 \,{\left (B a^{3} - 3 \, A a^{2} b\right )} x}{2 \,{\left (b x + a\right )}^{2} a^{4} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]